package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_template;

//DAO
public interface U_templateMapperBase {

	//根据id查看
    @Select("SELECT * FROM U_TEMPLATE ")
	public ApiU_template findU_templateById(Integer template_id);
	
    //查看数据集
    @Select("SELECT * FROM U_template")
	public List<ApiU_template> findU_templates();
	
    //根据条件查看数据集
	public List<Map<String, Object>> findU_templatesByMap(HashMap condition);
    
	//添加
    @Insert("INSERT INTO U_TEMPLATE (TEMPLATE_ID, TPL_NAME, TPL_THUMB, BG_IMAGE, BG_AUDIO, TYPE, TPL_DESC, TPL_LEVEL, CREATE_TIME, CREATE_BY, MODIFY_TIME, MODIFY_BY, STATUS, CONTROLLER_ROUTE, THEME, PARAMETERS, EXT_1, EXT_2, EXT_3, EXT_4, EXT_5) VALUES (#{template_id}, #{tpl_name}, #{tpl_thumb}, #{bg_image}, #{bg_audio}, #{type}, #{tpl_desc}, #{tpl_level}, #{create_time}, #{create_by}, #{modify_time}, #{modify_by}, #{status}, #{controller_route}, #{theme}, #{parameters}, #{ext_1}, #{ext_2}, #{ext_3}, #{ext_4}, #{ext_5})")
 	@Options(useGeneratedKeys = false, keyProperty = "")
    public int insertU_template(ApiU_template u_template);
  	
	//修改
    @Update("UPDATE U_TEMPLATE SET TEMPLATE_ID = #{template_id}, TPL_NAME = #{tpl_name}, TPL_THUMB = #{tpl_thumb}, BG_IMAGE = #{bg_image}, BG_AUDIO = #{bg_audio}, TYPE = #{type}, TPL_DESC = #{tpl_desc}, TPL_LEVEL = #{tpl_level}, CREATE_TIME = #{create_time}, CREATE_BY = #{create_by}, MODIFY_TIME = #{modify_time}, MODIFY_BY = #{modify_by}, STATUS = #{status}, CONTROLLER_ROUTE = #{controller_route}, THEME = #{theme}, PARAMETERS = #{parameters}, EXT_1 = #{ext_1}, EXT_2 = #{ext_2}, EXT_3 = #{ext_3}, EXT_4 = #{ext_4}, EXT_5 = #{ext_5}")
    public int updateU_template(ApiU_template u_template);
    
    //删除
    @Delete("DELETE FROM U_TEMPLATE ")
    public int deleteU_template(Integer template_id);
 
    // Foreign keys revelant		
		

	//region Indexs revelant
    
    
    
}


